<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<script type="text/javascript" src="resources/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$(function(){
	var yue1=$(".yue1").val();
	var ri1=$(".ri1").val();
		$("#selectId1").children("option").each(function(){  
               var temp_value = $(this).val();  
              if(temp_value == yue1){  
                    $(this).attr("selected","selected");  
              }  
         });  
		$("#selectId2").children("option").each(function(){  
            var temp_value = $(this).val();  
           if(temp_value == ri1){  
                 $(this).attr("selected","selected");  
           }  
      });  
})
</script>
<title>My JSP 'edit.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<form action="<%=basePath%>JrInfoController/updateInfo" method="post">
		<input type="hidden" name="id" value="${jrInfos.id }" />
		<input class="yue1" id="yue1" type="hidden"  value="${yue}" />
		<input class="ri1" id="ri1" type="hidden" value="${ri}" />
		节日类型
		<select name="jrtype">
			<option value="" >---请选择----</option>
			<option value="0" <c:if test="${jrInfos.jrtype==0 }"> selected="selected"</c:if> >中国传统节日</option>
			<option value="1" <c:if test="${jrInfos.jrtype==1 }"> selected="selected"</c:if> >网络节日</option>
			<option value="2" <c:if test="${jrInfos.jrtype ==2 }"> selected="selected"</c:if> >国际节日</option>
			<option value="3" <c:if test="${jrInfos.jrtype==3 }"> selected="selected"</c:if> >历史上的今天</option>
		</select><br /> 
		节日名称:<input type="text" name="jrname" value="${jrInfos.jrname }" onblur="javascript:checkTitle()" /><br /> 
		时间: <select name="yue" id="selectId1">
			<%
				for (int i = 1; i < 13; i++) {
					if (i < 10) {
					%><option value="0<%=i%>">0<%=i%></option>
					<%
						} else {
					%><option value="<%=i%>"><%=i%></option>
					<%
						}
						}
					%> }
		</select> - <select name="ri" id="selectId2">
			<%
				for (int i = 1; i < 32; i++) {
					if (i < 10) {
			%><option value="0<%=i%>">0<%=i%></option>
			<%
				} else {
			%><option value="<%=i%>"><%=i%></option>
			<%
				}
				}
			%> }
		</select><br />
		<input  type="hidden" id="wo" value="${jrInfos.jrxq }" style="height:50px; width:200px;"/><br />		简介:
		<textarea id="t1" name="jrxq" rows="3" cols="30"> </textarea>
		<script type="text/javascript">
		var jrxq=document.getElementById("wo").value;
		document.getElementById("t1").value=jrxq;
		</script>
		<input type="submit" />
	</form>
</body>
</html>
